<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Kafka</title>
<body>
    <div id="container">
        <button type="button" data-dismiss="modal" v-on:click="action('act')">更新</button>
        <button type="button" data-dismiss="modal" v-on:click="action('job_collect')">收藏</button>
        <button type="button" data-dismiss="modal" v-on:click="action('cv_send')">投简历</button>
        <button type="button" data-dismiss="modal" v-on:click="action('cv_upload')">上传简历</button>
    </div>
</body>
<!--vue-->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    new Vue({
        el: "#container",
        data: {
            user_id: "aa123",
            act_time: new Date(),
            job_code: "job1"
        },
        methods: {
            action(act){
                var t = this;
                axios.post("http://192.168.80.100:81/kafka/log",
                    "user_id="+ t.user_id + " " +
                    "action="+ act + " " +
                    "act_time="+ t.act_time + " " +
                    "job_code="+ t.job_code
                ).then(
                    function (response) {
                    }, function (error) {
                    }
                )
            }
        },
        created(){
        }
    })
</script>
</html>